import request from '~/utils/resquest'

// 查询设备应用列表
export const getDeviceApplicationList = <T>(params: T) =>
  request({
    url: '/api/gxsaas-monitor/task/hardware/v1_4/groupLoopList',
    method: 'get',
    params
  })

// 移出设备应用
export const removeDeviceApplicationInfo = <T>(params: T) =>
  request({
    url: '/api/gxsaas-monitor/task/hardware/v1_4/removeGroupLoop',
    method: 'post',
    params
  })

// 回路设备应用
export const applyDeviceApplicationInfo = <T>(params: T) =>
  request({
    url: '/api/gxsaas-monitor/task/hardware/v1_4/groupLoopApply',
    method: 'post',
    params
  })

// 获取设备应用执行日志
export const getExecutionLogList = <T>(params: T) =>
  request({
    url: '/api/gxsaas-monitor/task/hardware/v1_4/taskRunDetailList',
    method: 'get',
    params
  })

// 召测设备应用
export const callTestDeviceApplicationInfo = <T>(params: T) =>
  request({
    url: '/api/gxsaas-protocol/protocol/excuteCommandCode',
    method: 'post',
    params
  })
